<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content=
            "maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,initial-scale=1.0,width=device-width"/>
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>工单处理</title>
    <link rel="stylesheet" type="text/css" href="../../css/aui.css"/>
    <link rel="stylesheet" type="text/css" href="../../css/rams.css"/>
    <link rel="stylesheet" type="text/css" href="../../css/malfunction/worksheet_detail.css"/>
</head>
<body style="background-color: #f5f5f5 !important;position: relative">
<header id="header" class="aui-bar aui-bar-nav headerMarginTop" style="background-color: #e9e9e9; color: #535353;position: fixed;font-weight: 700">
    <div class="aui-pull-left aui-btn" onclick="common.closeAndReloadAppointPage('reload_worksheet_manage')">
        <span class="aui-iconfont aui-icon-left" style="color: #535353 !important;font-weight: 800"></span>返回
    </div>
    <div class="aui-title">工单详情</div>
    <div class="aui-pull-right" style="margin-top:0.6rem;margin-right:0.3rem;width: 11%;height:11%;">
        <img src="../../image/three_lines.png" onclick="showMenu()">
    </div>
    <div class="activityMenu" id="activityMenu" style="display:none;">
    </div>
</header>
<div id="baseInfo" style="position: relative;" class="bodyMarginTop">
    <div class="redLine"></div>
    <img class="orangeRectangleImage" src="../../image/orange_rectangle.png">
    <div id="orangeRectangleInfo" class="orangeRectangleInfo" onclick="pageDispose()">
    </div>
    <div class="tab" id="tab">
        <div class="tab-item" id="tab-worksheet-info" data-to="worksheet-info" onclick="changeTab(this);">工单信息</div>
        <div class="tab-item" id="tab-malfunction-info" data-to="malfunction-info" onclick="changeTab(this);">故障信息</div>
        <div class="tab-item tab-active" id="tab-flow-info" data-to="flow-info" onclick="changeTab(this);">流转信息</div>
    </div>
    <div id="workSheetDetail" style="position:relative;background-color: white;margin-bottom: 2.8rem">
    </div>
</div>

<footer class="aui-bar aui-bar-tab" id="footer" style="background-color: #e7e7e7; color: #292929">
    <img style="width:150px;height:150px;position:absolute;right:0;bottom:2.5rem;" src="../../image/liantong_dark_fringe.png">
    <div class="redLine"></div>
    <div style="background-color: white">
        <div class="aui-bar-tab-item" tapmode onclick="openAppointPage('worksheet_manage')">
            <img class="aui-iconfont" style="margin-left: 40%" src="../../image/gongdanchuli_orange_icon.png">
            <div class="aui-bar-tab-label" style="margin-top: 0.1rem;color: #ff6600">工单处理</div>
        </div>
        <div class="aui-bar-tab-item"  tapmode onclick="openAppointPage(null)">
            <img class="aui-iconfont" style="margin-left: 38%" src="../../image/gailanshitu_icon.png" >
            <div class="aui-bar-tab-label" style="margin-top: 0.1rem">概览视图</div>
        </div>
        <div class="aui-bar-tab-item"  tapmode onclick="openAppointPage(null)">
            <img class="aui-iconfont" style="margin-left: 37.5%" src="../../image/peizhiguanli_icon.png">
            <div class="aui-bar-tab-label" style="margin-top: 0.1rem">配置管理</div>
        </div>
        <div class="aui-bar-tab-item" tapmode onclick="openAppointPage('person_center')">
            <img class="aui-iconfont" style="margin-left: 39%" src="../../image/wode_icon.png">
            <div class="aui-bar-tab-label" style="margin-top: 0.1rem">我的</div>
        </div>
    </div>
</footer>
</body>
<script id="base-info" type="text/template">
    <div>
        <div class="baseInfoTitle">工单编号：</div>
        <div style="display: inline-block;font-size: 0.7rem">{{=it.wsNum}}</div>
        <div>
            <div class="baseInfoTitle">工单主题：</div>
            <div class="baseInfoName">{{=it.wsTitle}}</div>
        </div>
    </div>
</script>
<script id="worksheet-info" type="text/template">
    <div style="margin-top: 0.5rem">
        <div class="infoLeft">工单流水号</div>
        <div class="infoRight">{{=it.wsNum||''}}</div>
        <div class="greyLine" style="margin-top: 0.1rem"></div>
    </div>
    <div>
        <div class="infoLeft">工单主题</div>
        <div class="infoRight">{{=it.wsTitle||''}}</div>
        <div class="greyLine" style="margin-top: 0.1rem"></div>
    </div>
    <div>
        <div class="infoLeft">工单状态</div>
        <div class="infoRight">
            {{=it.orderState}}
        </div>
        <div class="greyLine" style="margin-top: 0.1rem"></div>
    </div>
    <div>
        <div class="infoLeft">建单人</div>
        <div class="infoRight">{{=it.sendUserId||''}}</div>
        <div class="greyLine" style="margin-top: 0.1rem"></div>
    </div>
    <div>
        <div class="infoLeft">建单部门</div>
        <div class="infoRight">{{=it.sendDeptId||''}}</div>
        <div class="greyLine" style="margin-top: 0.1rem"></div>
    </div>
    <div>
        <div class="infoLeft">建单人联系方式</div>
        <div class="infoRight">{{=it.phoneNumber||''}}</div>
        <div class="greyLine" style="margin-top: 0.1rem"></div>
    </div>
    <div>
        <div class="infoLeft">建单时间</div>
        <div class="infoRight">{{=it.wsCreateDate||''}}</div>
        <div class="greyLine" style="margin-top: 0.1rem"></div>
    </div>
    <div>
        <div class="infoLeft">处理人</div>
        <div class="infoRight">{{=it.dealManFK||''}}</div>
        <div class="greyLine" style="margin-top: 0.1rem"></div>
    </div>
    <div>
        <div class="infoLeft">处理部门</div>
        <div class="infoRight">{{=it.dealDeptFK||''}}</div>
        <div class="greyLine" style="margin-top: 0.1rem"></div>
    </div>
    <div>
        <div class="infoLeft">处理人联系方式</div>
        <div class="infoRight">{{=it.dealPhoneFK||''}}</div>
        <div class="greyLine" style="margin-top: 0.1rem"></div>
    </div>
    <div>
        <div class="infoLeft">处理时间</div>
        <div class="infoRight">{{=it.dealTimeFK||''}}</div>
        <div class="greyLine" style="margin-top: 0.1rem"></div>
    </div>
    <div>
        <div class="infoLeft">处理历时</div>
        <div class="infoRight">
            {{=it.clls||''}}
        </div>
        <div class="greyLine" style="margin-top: 0.1rem"></div>
    </div>
    <div>
        <div class="infoLeft">挂起历时</div>
        <div class="infoRight">{{=it.suspendLast||''}}</div>
        <div class="greyLine" style="margin-top: 0.1rem"></div>
    </div>
    <div>
        <div class="infoLeft">处理时限剩余时间</div>
        <div class="infoRight">
            {{=it.clss||''}}
        </div>
        <div class="greyLine" style="margin-top: 0.1rem"></div>
    </div>
    <div>
        <div class="infoLeft">工单净历时</div>
        <div class="infoRight">{{=it.sheetLast||''}}</div>
        <div class="greyLine" style="margin-top: 0.1rem"></div>
    </div>
</script>
<script id="malfunction-info" type="text/template">
    <div style="margin-top: 0.5rem">
        <div class="infoLeft">故障专业</div>
        <div class="infoRight">{{=it.dmPro||''}}</div>
        <div class="greyLine" style="margin-top: 0.1rem"></div>
    </div>
    <div>
        <div class="infoLeft">故障处理响应级别</div>
        <div class="infoRight">{{=it.dmLevel||''}}</div>
        <div class="greyLine" style="margin-top: 0.1rem"></div>
    </div>
    <div>
        <div class="infoLeft">故障受理时限</div>
        <div class="infoRight">{{=it.dmRrpLimt||''}}</div>
        <div class="greyLine" style="margin-top: 0.1rem"></div>
    </div>
    <div>
        <div class="infoLeft">故障处理时限</div>
        <div class="infoRight">{{=it.dmDealLimit||''}}</div>
        <div class="greyLine" style="margin-top: 0.1rem"></div>
    </div>
    <div>
        <div class="infoLeft">故障发生时间</div>
        <div class="infoRight">{{=it.dmHapTime||''}}</div>
        <div class="greyLine" style="margin-top: 0.1rem"></div>
    </div>
    <div>
        <div class="infoLeft">线路级别</div>
        <div class="infoRight">{{=it.lineLevel||''}}</div>
        <div class="greyLine" style="margin-top: 0.1rem"></div>
    </div>
    <div>
        <div class="infoLeft">投诉联系电话</div>
        <div class="infoRight">{{=it.disclosurePhone||''}}</div>
        <div class="greyLine" style="margin-top: 0.1rem"></div>
    </div>
    <div>
        <div class="infoLeft">告警省份</div>
        <div class="infoRight">{{=it.alarmProvince||''}}</div>
        <div class="greyLine" style="margin-top: 0.1rem"></div>
    </div>
    <div>
        <div class="infoLeft">派单方式</div>
        <div class="infoRight">{{=it.createType||''}}</div>
        <div class="greyLine" style="margin-top: 0.1rem"></div>
    </div>
    <div>
        <div class="infoLeft">告警地市</div>
        <div class="infoRight">{{=it.alarmRegion||''}}</div>
        <div class="greyLine" style="margin-top: 0.1rem"></div>
    </div>
    <div>
        <div class="infoLeft">告警区县</div>
        <div class="infoRight"></div>
        <div class="greyLine" style="margin-top: 0.1rem"></div>
    </div>
    <div>
        <div class="infoLeft">故障发现方式</div>
        <div class="infoRight">{{=it.dmFindType||''}}</div>
        <div class="greyLine" style="margin-top: 0.1rem"></div>
    </div>
    <div>
        <div class="infoLeft">预处理描述</div>
        <div class="infoRight">{{=it.dmDetails||''}}</div>
        <div class="greyLine" style="margin-top: 0.1rem"></div>
    </div>
    <div>
        <div class="infoLeft">告警描述</div>
        <div class="infoRight">{{=it.alarmDetail||''}}</div>
        <div class="greyLine" style="margin-top: 0.1rem"></div>
    </div>
    <div>
        <div class="infoLeft">投诉联系人</div>
        <div class="infoRight">{{=it.complainantUser||''}}</div>
        <div class="greyLine" style="margin-top: 0.1rem"></div>
    </div>
    <div>
        <div class="infoLeft">网管告警流水号</div>
        <div class="infoRight">{{=it.reservrId||''}}</div>
        <div class="greyLine" style="margin-top: 0.1rem"></div>
    </div>
    <div>
        <div class="infoLeft">网管告警ID</div>
        <div class="infoRight">{{=it.alarmstaId||''}}</div>
        <div class="greyLine" style="margin-top: 0.1rem"></div>
    </div>
    <div>
        <div class="infoLeft">原始告警ID</div>
        <div class="infoRight">{{=it.orialarmId||''}}</div>
        <div class="greyLine" style="margin-top: 0.1rem"></div>
    </div>
    <div>
        <div class="infoLeft">告警逻辑分类</div>
        <div class="infoRight">{{=it.alarmtype||''}}</div>
        <div class="greyLine" style="margin-top: 0.1rem"></div>
    </div>
    <div>
        <div class="infoLeft">告警逻辑子类</div>
        <div class="infoRight">{{=it.alarmsubtype||''}}</div>
        <div class="greyLine" style="margin-top: 0.1rem"></div>
    </div>
    <div>
        <div class="infoLeft">告警定位</div>
        <div class="infoRight">{{=it.alarmlocation||''}}</div>
        <div class="greyLine" style="margin-top: 0.1rem"></div>
    </div>
    <div>
        <div class="infoLeft">告警级别</div>
        <div class="infoRight">{{=it.alarmLevel||''}}</div>
        <div class="greyLine" style="margin-top: 0.1rem"></div>
    </div>
    <div>
        <div class="infoLeft">故障清除时间</div>
        <div class="infoRight">{{=it.alarmcleantime||''}}</div>
        <div class="greyLine" style="margin-top: 0.1rem"></div>
    </div>

    <div>
        <div class="infoLeft">网元ID</div>
        <div class="infoRight">{{=it.neid||''}}</div>
        <div class="greyLine" style="margin-top: 0.1rem"></div>
    </div>
    <div>
        <div class="infoLeft">网元名称</div>
        <div class="infoRight">{{=it.nename||''}}</div>
        <div class="greyLine" style="margin-top: 0.1rem"></div>
    </div>
    <div>
        <div class="infoLeft">设备ID</div>
        <div class="infoRight">{{=it.equipmentid||''}}</div>
        <div class="greyLine" style="margin-top: 0.1rem"></div>
    </div>
    <div>
        <div class="infoLeft">设备名称</div>
        <div class="infoRight">{{=it.equipmentname||''}}</div>
        <div class="greyLine" style="margin-top: 0.1rem"></div>
    </div>
    <div>
        <div class="infoLeft">设备厂家</div>
        <div class="infoRight">{{=it.alarmvendor||''}}</div>
        <div class="greyLine" style="margin-top: 0.1rem"></div>
    </div>
    <div>
        <div class="infoLeft">设备型号</div>
        <div class="infoRight">{{=it.equiptype||''}}</div>
        <div class="greyLine" style="margin-top: 0.1rem"></div>
    </div>
</script>
<script id="flow-info" type="text/template">
    {{?it}}
    {{~it:info:index}}
    <div style="position: relative;margin-top: 0.5rem;height: auto;width: 90%">

        {{?index==(it.length-1)}}
        <div class="flowInfoLeft">
            <div class="orangeCircle"></div>
            <div class="line"  style="bottom: 0.5rem"></div>
        </div>
        <div  style="margin-top: 0.7rem;margin-left: 4rem; height: auto;display: inline-block;margin-bottom: 0.5rem" >
        {{??}}
        <div class="flowInfoLeft">
            <div class="orangeCircle"></div>
            <div class="line"></div>
        </div>
        <div  style="margin-top: 0.7rem;margin-left: 4rem; height: auto;display: inline-block;" >
        {{?}}
            <div >
                <div style="font-weight: 700">{{=info.taskType||''}}</div>
            </div>
            <div >
                <div >{{=info.column5||''}}</div>
            </div>

            <div style="font-size: 0.7rem;color: #9a9a9a">
                <div>{{=info.disposeMan||''}}
                    {{?info.disposeManDep}}
                    ({{=info.disposeManDep||''}})
                    {{?}}
                </div>
            </div>
            <div style="font-size: 0.7rem;color: #9a9a9a">
                <div>处理人联系方式：</div>
            </div>
            <div style="font-size: 0.7rem;color: #9a9a9a">
                <div>{{=info.dealMan||''}}
                    {{?info.dealDept}}
                    ({{=info.dealDept||''}})
                    {{?}}
                </div>
            </div>


        </div>
    </div>
    {{~}}
    {{?}}
</script>
<script id="menu-info" type="text/template">
    {{?it&&it.length>0}}
    <div class="triangle"></div>
    <div class="blackBox">
        {{~it:info:index}}
        <div onclick="openProcessWin('{{=info.pageUrl}}')">
            <div class="menuIconDiv">
                <img src="../../image/{{=info.imgUrl}}"  class="menuIcon">
            </div>
            <div class="menuName">{{=info.key}}</div>
            {{?index==(it.length-1)}}
            <div class="menuLine" style="margin-bottom: 0.5rem"></div>
            {{??}}
            <div class="menuLine"></div>
            {{?}}
        </div>
        {{~}}
    </div>
    {{?}}
</script>
<script type="text/javascript" src="../../script/api.js"></script>
<script type="text/javascript" src="../../script/doT.min.js"></script>
<script type="text/javascript" src="../../script/config.js"></script>
<script type="text/javascript" src="../../script/common.js"></script>
<script type="text/javascript" src="../../script/aui-tab.js"></script>
<script>
    var menuFlag = false;
    var initMenuFlag;
    var params;
    var list;
    var currentTab = 0;
    var tabList = ['tab-worksheet-info','tab-malfunction-info','tab-flow-info']
    apiready = function () {
        api.parseTapmode();
        //监听操作完成事件 刷新流程菜单
        api.addEventListener({
            name: 'process_success_reload_worksheet_detail'
        },function () {
            $api.setStorage(storageKey.operate_status,'operate_success');
            window.location.reload();
        })
        //加载操作菜单
        initMenu();
        keyBackListener();

        loadAllInfo();

        // 监控左划事件
        api.addEventListener({
            name:'swipeleft'
        }, function(ret, err){
            if (currentTab === 2){
                currentTab = 2
            } else {
                currentTab = currentTab + 1
            }
            var id = tabList[currentTab]
            changeTab($api.dom('#'+id))
        });
        // 监控右划事件
        api.addEventListener({
            name:'swiperight'
        }, function(ret, err){
            if (currentTab === 0){
                currentTab = 0
            } else {
                currentTab = currentTab - 1
            }
            var id = tabList[currentTab]
            changeTab($api.dom('#'+id))
        });
    };


    var loadAllInfo = function () {
        //加载工单信息、故障信息、流传信息
        loadWorksheetAndMalfunctionInfo();

        loadFlowInfo();
    };

    function changeTab(obj) {
        pageDispose()
        var auiActive = $api.hasCls(obj, 'tab-active');
        if (!auiActive) {
            $api.removeCls($api.byId('tab-worksheet-info'), 'tab-active');
            $api.removeCls($api.byId('tab-malfunction-info'), 'tab-active');
            $api.removeCls($api.byId('tab-flow-info'), 'tab-active');
            $api.addCls(obj, 'tab-active');
        }
        var dataTo = $api.attr(obj, 'data-to');
        if (dataTo === "worksheet-info") {
            var worksheetInfo = doT.template($api.text($api.byId('worksheet-info')));
            $api.html($api.byId('workSheetDetail'), worksheetInfo(params));
        } else if (dataTo === "malfunction-info") {
            var malfunctionInfo = doT.template($api.text($api.byId('malfunction-info')));
            $api.html($api.byId('workSheetDetail'), malfunctionInfo(params));
        } else if (dataTo === "flow-info") {
            var flowInfo = doT.template($api.text($api.byId('flow-info')));
            $api.html($api.byId('workSheetDetail'), flowInfo(list));

        }
    }
    function loadWorksheetAndMalfunctionInfo() {
        //加载工单信息时，重新画一下基础信息数据
        var wsNum = $api.getStorage(storageKey.wsNum);
        common.post({
            url: config.worksheetDetailUrl,
            isLoading: true,
            data:{
                wsNum:wsNum
            },
            success: function (ret) {
                if (ret.status === '200'){
                    params = ret.data
                    //每次刷新工单信息，把工单id存到storage里
                    $api.setStorage(storageKey.wsId,  ret.data.wsId);
                    $api.html($api.byId('orangeRectangleInfo'), "");
                    var baseInfo = doT.template($api.text($api.byId('base-info')));
                    $api.html($api.byId('orangeRectangleInfo'), baseInfo(params));

                }else{
                    api.toast({
                        msg: '工单详情获取失败！',
                        duration: config.duration,
                        location: 'middle'
                    });
                }
            }
        });
    }
    function loadFlowInfo() {
        var wsNum = $api.getStorage(storageKey.wsNum);
        var processId = $api.getStorage(storageKey.processId);
        common.post({
            url: config.flowInfoUrl,
            isLoading: true,
            data:{
                wsNum:wsNum,
                processId:processId
            },
            success: function (ret) {
                if (ret.status === '200'){
                    var params = ret.data;
                    list = []
                    for (var K in params){
                        if (K !== 'size'){
                            list.push(params[K])
                        }
                    }
                    $api.html($api.byId('workSheetDetail'), "");
                    var flowInfo = doT.template($api.text($api.byId('flow-info')));
                    $api.html($api.byId('workSheetDetail'), flowInfo(list));
                }else{
                    api.toast({
                        msg: '流转信息获取失败！',
                        duration: config.duration,
                        location: 'middle'
                    });
                }
            }
        });
    }
    function keyBackListener() {
        api.addEventListener({
            name: 'keyback'
        }, function () {
            common.closeAndReloadAppointPage('reload_worksheet_manage');
        })
    }
    function openAppointPage(name){
        if (name===null){
            api.toast({
                msg: '此功能暂未开放！',
                duration: config.duration,
                location: 'middle'
            });
            return
        }
        api.openWin({
            name: name,
            bounces: false,
            slidBackEnabled : false,
            reload:true,
            url: '../' + name + '.html',
            vScrollBarEnabled:true,
            hScrollBarEnabled:false
        });
    }

    function initMenu() {
        var wsNum = $api.getStorage(storageKey.wsNum);
        common.post({
            url: config.getProcessMenu,
            isLoading: true,
            data:{
                wsNum:wsNum
            },
            success: function (ret) {
                if(ret&&ret.content){
                    var params = ret.content;
                    var list = []
                    for (var K in params){
                        var key =   params[K].key
                        var data  = {
                            imgUrl:null,
                            pageUrl:null,
                            key:null
                        }
                        if(key==='接单开始处理'){  // 测试通过
                            data.imgUrl = 'jiedankaishichuli.png';
                            data.pageUrl = 'jiedankaishichuli';
                        }else if(key==='转派'){
                            data.imgUrl = 'zhuanpai.png';
                            data.pageUrl = 'forwardWorksheet';
                        }else if(key==='追派'){
                            data.imgUrl = 'zhuipai.png';
                            data.pageUrl = 'appendWorkSheet';
                        }else if(key==='返单'){
                            data.imgUrl = 'fandan.png';
                            data.pageUrl = 'overWorksheet';
                        }else if(key==='确认结单'){
                            data.imgUrl = 'querenjiedan.png';
                            data.pageUrl = 'confirmFinishWorksheet';
                        }else if(key==='信息追加'){  //测试通过
                            data.imgUrl = 'xinxizhuijia.png';
                            data.pageUrl = 'appendMessage';
                        }else if(key==='挂起申请'){
                            data.imgUrl = 'guaqishenqing.png';
                            data.pageUrl = 'suspendApplication';
                        }
                        // else if(key==='挂起审核'){
                        //     data.imgUrl = 'guaqishenhe.png';
                        //     data.pageUrl = 'suspendAudit';
                        // }
                        else if(key==='阶段回复'){
                            data.imgUrl = 'jieduanhuifu.png';
                            data.pageUrl = 'stageResponse';
                        }else if(key==='退回重新处理'){
                            data.imgUrl = 'tuihuichongxinchuli.png';
                            data.pageUrl = 'returnToreProcessing';
                        }else if(key==='归档'){
                            data.imgUrl = 'guidang.png';
                            data.pageUrl = 'archiveWorksheet';
                        }

                        if(data.imgUrl!=null){
                            data.key = key
                            list.push(data)
                        }
                    }
                    if (list.length>0){
                        $api.html($api.byId('activityMenu'), "");
                        var menuInfo = doT.template($api.text($api.byId('menu-info')));
                        $api.html($api.byId('activityMenu'), menuInfo(list));
                    } else{
                        api.toast({
                            msg: '当前工单没有可操作流程！',
                            duration: config.duration,
                            location: 'middle'
                        });
                    }
                    initMenuFlag = true;
                }else{
                    api.toast({
                        msg: '获取操作菜单失败！',
                        duration: config.duration,
                        location: 'middle'
                    });
                }

            }
        });
    }


    function openProcessWin(name) {
        if (name === 'jiedankaishichuli'){
            var wsNum = $api.getStorage(storageKey.wsNum);
            var processId = $api.getStorage(storageKey.processId);
            common.post({
                url: config.processWorksheetUrl,
                isLoading: true,
                data:{
                    wsNum:wsNum,
                    processId:processId
                },
                success: function (ret) {
                    if (ret&&ret.status==='200'){
                        api.alert({
                            title: '提示',
                            msg: '接单开始处理操作成功！',
                        }, function (ret, err) {
                            //发送监听
                            window.location.reload();
                        });
                        common.reloadAppointPage('process_success_reload_worksheet_detail');
                    } else {
                        // 因为返回的错误信息是英文，所有没有单独显示错误信息。
                        api.toast({
                            msg:  '接单开始处理操作失败！',
                            duration: config.duration,
                            location: 'middle'
                        });
                    }
                }
            });
        } else{
            pageDispose();
            api.openWin({
                name: name,
                bounces: false,
                slidBackEnabled : false,
                reload:true,
                url: './' + name + '.html',
                vScrollBarEnabled:true,
                hScrollBarEnabled:false
            });
        }
    }

    /**
     * 点击工单基础信息部分，对页面细节进行处理，暂时是去掉流程菜单弹窗
     */
    function pageDispose() {//点击橙色区域影藏操作菜单
        //获取要显示的div对象
        var menu = $api.byId('activityMenu');
        //显示
        menu.style.display="none";
    }
    /*function showMenu() {//点击菜单按钮显示操作菜单
        //获取要显示的div对象
        var menu = $api.byId('activityMenu');
        //显示
        menu.style.display="block";
    }*/
    function showMenu() {
        if(initMenuFlag){
            var menu = $api.byId('activityMenu');
            //显示
            menu.style.display="block";
            frameFlag = true;
        }else{
            if(menuFlag){
                var menu = $api.byId('activityMenu');
                //显示
                menu.style.display="block";
            }else{
                api.toast({
                    msg: '操作流程菜单加载中，请稍后...',
                    duration: 2000,
                    location: 'middle'
                });
            }

        }
    }
</script>
</html>
